package com.ruoyi.point.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.ibatis.type.Alias;

/**
 * 积分流水对象 point_flow
 * 
 * @author hy
 * @date 2025-08-12
 */
@Alias("pointpointFlow")
public class PointFlow extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 流水ID */
    private Long id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 积分变动数量 */
    @Excel(name = "积分变动数量")
    private Long point;

    /** 积分规则ID */
    @Excel(name = "积分规则ID")
    private Long ruleId;

    /** 操作后剩余积分 */
    @Excel(name = "操作后剩余积分")
    private Long balance;

    /** 变动描述 */
    @Excel(name = "变动描述")
    private String description;

    /** 是否删除：0正常 1删除 */
    private Integer del;

    // 多表联查关联的实体类
    /** 关联的用户信息 */
    private Users users;

    /** 关联的积分规则信息 */
    private PointRule pointRule;

    /** 关联的评论信息（如果积分来源是评论相关） */
    private Comments comments;

    /** 关联的兑换订单信息（如果积分来源是兑换相关） */
    private ExchangeOrder exchangeOrder;

    /** 关联的菜谱信息（如果积分来源是菜谱相关） */
    private Recipes recipes;

    /** 关联的作品信息（如果积分来源是作品相关） */
    private Works works;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setPoint(Long point) 
    {
        this.point = point;
    }

    public Long getPoint() 
    {
        return point;
    }

    public void setRuleId(Long ruleId) 
    {
        this.ruleId = ruleId;
    }

    public Long getRuleId() 
    {
        return ruleId;
    }

    public void setBalance(Long balance) 
    {
        this.balance = balance;
    }

    public Long getBalance() 
    {
        return balance;
    }

    public void setDescription(String description) 
    {
        this.description = description;
    }

    public String getDescription() 
    {
        return description;
    }

    public void setDel(Integer del) 
    {
        this.del = del;
    }

    public Integer getDel() 
    {
        return del;
    }

    // 关联实体类的getter和setter
    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }

    public PointRule getPointRule() {
        return pointRule;
    }

    public void setPointRule(PointRule pointRule) {
        this.pointRule = pointRule;
    }

    public Comments getComments() {
        return comments;
    }

    public void setComments(Comments comments) {
        this.comments = comments;
    }

    public ExchangeOrder getExchangeOrder() {
        return exchangeOrder;
    }

    public void setExchangeOrder(ExchangeOrder exchangeOrder) {
        this.exchangeOrder = exchangeOrder;
    }

    public Recipes getRecipes() {
        return recipes;
    }

    public void setRecipes(Recipes recipes) {
        this.recipes = recipes;
    }

    public Works getWorks() {
        return works;
    }

    public void setWorks(Works works) {
        this.works = works;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("point", getPoint())
            .append("ruleId", getRuleId())
            .append("balance", getBalance())
            .append("description", getDescription())
            .append("createTime", getCreateTime())
            .append("del", getDel())
            .toString();
    }
}
